Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallelize writes when there are multiple redis sinks #60

Conversation

torywheelwright
Copy link
Member

@torywheelwright torywheelwright commented Mar 30, 2024

#50 added support for redis sentinel. This was implemented in such a way that you can provide multiple redis cluster URLs, and oplogtoredis will write to all of them. The way that this was implemented has two problems:

  1. oplogtoredis periodically checkpoints the last-successfully-processed oplog timestamp to redis. When support for writing to multiple redis clusters was added, it started writing the checkpoint after the first write success, rather than after all writes succeeded. This creates a small window where oplogtoredis could fail, and resume from too-late of an oplog checkpoint and miss some messages.
  2. The writes to redis aren't parallelized, so if you have N redis servers, you'll need to do N writes in succession per-oplog-message.

This PR fixes both of those things. It also adds another partitioning dimension, "clientIdx" (i.e., the first redis url is index 0, the second is index 1, etc), to the otr_redispub_processed_messages and otr_redispub_temporary_send_failures metrics.

@torywheelwright torywheelwright force-pushed the tory.oplogtoredis-parallelize-writes-to-multiple-redis-clusters branch from 6183568 to 5dcc6ac Compare April 3, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant